//
//  DottedView.m
//  JinMaJiaDemo
//
//  Created by GripMeMory on 16/1/15.
//  Copyright © 2016年 GripMeMory. All rights reserved.
//

#import "DottedView.h"

@implementation DottedView


// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    CAShapeLayer *shapeLayer = [[CAShapeLayer alloc] initWithLayer:self.layer];
//    shapeLayer.fillColor = [RGB_COLOR(@"#d5a540") CGColor];
    shapeLayer.strokeColor = [RGB_COLOR(@"#d5a540") CGColor];
    shapeLayer.lineDashPattern = @[@10, @2];
    
    UIBezierPath *path = [[UIBezierPath alloc] init];
    [path moveToPoint:CGPointZero];
    [path addLineToPoint:CGPointMake(self.bounds.size.width, -self.bounds.origin.y)];
    shapeLayer.path = [path CGPath];
    [self.layer addSublayer:shapeLayer];
}


@end
